<?php $this->_extends('_layouts/default_layout'); ?>

<?php $this->_block('title'); ?>报道小新闻<?php $this->_endblock(); ?>

<?php $this->_block('contents'); ?>

<?php if(isset($content)): echo $content; else: ?>

<div class="form-div">
<form action="<?=url("press/add") ?>" method="POST">
	<div class="description" style="margin: 10px 0px 20px 20px; font-weight: bold;"> 背景<font style="color: #A5C98B; font-weight: bold;">绿色</font>的为必填项</div>
	<div class="form-part">
		<span class="title ui-corner-top"> 小新闻 </span>
	</div>
	
	<table style="clear:left; width: 100%; margin-left: 20px;">
			<tr>
 				<th style="width: 8em"><label for="link">参考链接: </label></th>
				<td><input name="link" id="link" class="textbox" maxlength=241 value="<?php if(isset($_POST['link'])): echo h($_POST['link']);  endif; ?>" size="60" type="text"><br />
					<?php if (isset($errMsg['link']) && !empty($errMsg['link'])):  echo "<div class='err-msg'>" . join("<br />", $errMsg['link']) . "</div>"; endif; ?>
					<span class="description">消息来源的url地址</span>
				</td>
 			</tr>
			<tr>
				<th style="width: 6em; vertical-align: top"><label for="press" ><font style="color: #C3480F">*</font> 新闻摘要: </label></th>
				<td><textarea class="textbox char-limit-240 important-text" cols="100" rows="4" name="press" ><?php if(isset($_POST['press'])): echo h($_POST['press']); endif; ?></textarea> <span class="limit-num">240</span>
				<?php if (isset($errMsg['press']) && !empty($errMsg['press'])):  echo "<div class='err-msg'>" . join("<br />", $errMsg['press']) . "</div>"; endif; ?>
					<span class="description">最多240个字</span>
 				</td>
			</tr>
 			<tr>
				<th><label for="date" ><font style="color: #C3480F">*</font> 新闻时间: </label></th>
				<td>
					<input autocomplete="off" value="<?php if(isset($_POST['date'])): echo h($_POST['date']); else: echo h(date("Y-m-d", time())); endif; ?>" size="10" class="textbox important-text" name="date" maxlength=10 id="date" type="text">
					<?php if (isset($errMsg['date']) && !empty($errMsg['date'])):  echo "<div class='err-msg'>" . join("<br />", $errMsg['date']) . "</div>"; endif; ?>
					
					<span class="description">如：2009-10-20</span>
 				</td>
			</tr>
			<tr>
 				<th><label for="tags">标签: </label></th> 
				<td><input name="tags" id="tags" class="textbox" maxlength=36 value="<?php if(isset($_POST['tags'])): echo h($_POST['tags']); endif; ?>" size="48" type="text"> <br />
					<?php if (isset($errMsg['tags']) && !empty($errMsg['tags'])):  echo "<div class='err-msg'>" . join("<br />", $errMsg['tags']) . "</div>"; endif; ?>
					<span class="description">根据标签，小新闻显示在相应证券页面上</span>
				</td>
 			</tr>
 		</table>
 	<div class="form-part">
		<span class="title ui-corner-top"> 评论 </span>
	</div>
 		<table style="clear:left; width: 100%; margin-left: 20px;">
			<tr>
 				<th style="width: 8em"><label for="view" style="vertical-align: top"><font style="color: #C3480F">*</font> 观点: </label></th>
 				<td><textarea name="view" id="view" class="textbox char-limit-240 important-text" rows=4 cols=100 ><?php if(isset($_POST['view'])): echo h($_POST['view']); endif; ?></textarea> <span class="limit-num">240</span>
 					<?php if (isset($errMsg['view']) && !empty($errMsg['view'])):  echo "<div class='err-msg'>" . join("<br />", $errMsg['view']) . "</div>"; endif; ?>
 					<span class="description">最多240个字</span>
 				</td>
 			</tr>
		</table>
 		<br />
		<div class="sbmit">
			<button style="margin-top:10px;" name="submit" type="submit">提交小新闻</button>
		</div>
	
</form>
</div>
<?php endif;?>
<?php $this->_endblock(); ?>

